package com.lcy.sys.controller;

import com.lcy.reuslt.Result;
import com.lcy.sys.model.vo.SysStatisticsResponse;
import com.lcy.sys.service.SysStatisticsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统统计数据 控制层
 *
 * @author zhang.rx
 * @since 2024/7/15
 */
@RestController
@Tag(name = "SysStatistics", description = "系统统计数据接口")
@RequestMapping("/sys/statistics")
@RequiredArgsConstructor
public class SysStatisticsController {

    private final SysStatisticsService statisticsService;

    /**
     * 获取系统统计数据
     *
     * @return 系统统计数据
     */
    @GetMapping("/getStatistics")
    @Operation(summary = "获取系统统计数据")
    public Result<SysStatisticsResponse> getStatistics() {
        return Result.success(statisticsService.getStatistics());
    }
} 